Class UpscalerOptionsEditor
Base inspector for UpscalerOptions and its subclasses. It draws the framework-common fields (the Resolution Mode dropdown, for quality-mode upscalers) so upscaler authors only implement their upscaler-specific options in DrawOptions() and never have to wire up the shared fields. Also hides the default "Script" field.
Inherited Members
Namespace: Global Namespace
Assembly: Unity.RenderPipelines.Core.Editor.dll
Syntax
[CustomEditor(typeof(UpscalerOptions), true)]
public class UpscalerOptionsEditor : Editor
Remarks
Used directly for options without a dedicated editor (the Resolution Mode field stays hidden because
showsResolutionMode defaults to false — it is dormant for upscalers with no quality mode). A
quality-mode upscaler provides a derived editor with [CustomEditor(typeof(MyOptions))] that overrides
showsResolutionMode (true) and DrawOptions() for its own fields. Do not call
serializedObject.Update()/ApplyModifiedProperties() in DrawOptions().
Properties
showsReactiveMaskGeneration
Override to true for upscalers that supports reactive mask parameter.
Declaration
protected virtual bool showsReactiveMaskGeneration { get; }
Property Value
| Type | Description |
|---|---|
| bool |
showsResolutionMode
Override to true for quality-mode upscalers so the Resolution Mode dropdown is shown.
Declaration
protected virtual bool showsResolutionMode { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
DrawOptions()
Draws the upscaler-specific options, between Update and ApplyModifiedProperties. The default draws every serialized field except the Script and the (framework-owned) Resolution Mode field.
Declaration
protected virtual void DrawOptions()
OnEnable()
Called when the object is loaded.
Declaration
protected virtual void OnEnable()
OnInspectorGUI()
Invoked when displaying upscaler options in the inspector.
Declaration
public override sealed void OnInspectorGUI()